package com.gitee.wsl.io.dataproxy


class SingeProxy<T>(var base: T) : DataProxy<T> {

    override fun iterator() = values().iterator()

    override val size: Int get() = 1

    override fun get(index: Int): T = base

    override fun set(index: Int, value: T) {
        base = value
    }

    override fun fill(value: T, fromIndex: Int, toIndex: Int) {
        base = value
    }

    override fun values(): List<T> = listOf(base)
}